create table if not exists jms_dm.dm_leave_message_keywords_detail_dt(
    dt                       date          NOT NULL COMMENT "消息更新日期"
    , waybill_no             varchar(255)   comment '运单号'
    , update_time            varchar(255)   comment '更新时间'
    , ordersource_code       varchar(255)   comment '订单来源CODE'
    , ordersource_name       varchar(255)   comment '订单来源'
    , register_network_code  varchar(255)   comment '登记网点代码'
    , register_network_name  varchar(255)   comment '登记网点名称'
    , message_keywords       varchar(1000) comment '关键词'
)
ENGINE=OLAP
DUPLICATE KEY(`dt`, `waybill_no`, `update_time`)
COMMENT "留言信息关键词明细"
PARTITION BY RANGE(`dt`)
(
    START ("2023-11-01") END ("2023-11-30") EVERY (INTERVAL 1 day)
)
DISTRIBUTED BY HASH(`waybill_no`) BUCKETS 1
PROPERTIES (
  "replication_num" = "3",
  "dynamic_partition.enable" = "true",
  "dynamic_partition.time_unit" = "DAY",
  "dynamic_partition.time_zone" = "Asia/Shanghai",
  "dynamic_partition.start" = "-185",
  "dynamic_partition.end" = "2",
  "dynamic_partition.prefix" = "p",
  "dynamic_partition.buckets" = "1",
  "in_memory" = "false",
  "storage_format" = "V2",
  "enable_persistent_index" = "false"
);